<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="applicable-device" content="mobile"/>
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <!--<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">-->
    <meta name="format-detection" content="telephone=no"/>

    <link rel="stylesheet" href="css/all.css"/>
    <link rel="stylesheet" href="lib/skin/layer.css"/>
    <script src="lib/flexible.js"></script>
    <script src="lib/jquery-1.9.1.min.js"></script>
    <script src="lib/jquery.cookie.js"></script>
    <script src="lib/layer.js"></script>
    <script src="js/hgNews.min.js"></script>
</head>
<body>
<!-- header -->
    <header class="header2">
        <a href="JavaScript:history.go(-1)" class="return"><img src="img/234d_03.png" /></a>
        <span class="word">我的收藏</span>
    </header>
<!-- /header -->
<!-- bodyer -->
<div class="bodyer" id="news-list">
    <div class="content">
        <div class="name fl_cd">
            <img class="top-photo" src="img/tmp/fff23_10.png">
            <span class="my-name">摄影师华子</span>
            <img class="top-cancel" src="img/3434coll_03.png">
        </div>
        <div class="list list-1"><p><a href="">首度人生难得的不是选择，而是选择后的坚持而是选择后的坚持</a></p></div>
        <div class="comment">
            <span class="exclusive">专访</span>
            <img class="look" src="img/sdfsdf_03.png" alt="">
            <span class="span1">235</span>
            <img class="look" src="img/fff34_05.png" alt="">
            <span class="span1">235</span>
            <span class="span1 time">2016-06-02</span>
        </div>
    </div>
    <div class="content">
        <div class="name fl_cd">
            <img class="top-photo" src="img/tmp/fff23_10.png">
            <span class="my-name">摄影师华子</span>
            <img class="top-cancel" src="img/3434coll_03.png">

        </div>
        <div class="list list-2">
            <p><a href="">首度人生难得的不是选择，而是选择后的坚持而是选择后的坚持</a></p>
            <div class="img">
                <a href=""><img class="" src="img/tmp/fff23_14.png"></a>
                <a href=""><img class="" src="img/tmp/fff23_14.png"></a>
                <a href=""><img class="" src="img/tmp/fff23_14.png"></a>
            </div>
        </div>
        <div class="comment">
            <span class="exclusive">专访</span>
            <img class="look" src="img/sdfsdf_03.png" alt="">
            <span class="span1">235</span>
            <img class="look" src="img/fff34_05.png" alt="">
            <span class="span1">235</span>
            <span class="span1 time">2016-06-02</span>
        </div>
    </div>
    <div class="content">
        <div class="name fl_cd">
            <img class="top-photo" src="img/tmp/fff23_10.png">
            <span class="my-name">摄影师华子</span>
            <img class="top-cancel" src="img/3434coll_03.png">

        </div>
        <div class="list fl_cd">
            <p class="word"><a href="">首度人生难得的不是选择，而是选择后的坚持而是选择后的坚持</a></p>
            <a class="img1" href=""><img class="" src="img/tmp/fff23_14.png"></a>
        </div>
        <div class="comment">
            <span class="exclusive">专访</span>
            <img class="look" src="img/sdfsdf_03.png" alt="">
            <span class="span1">235</span>
            <img class="look" src="img/fff34_05.png" alt="">
            <span class="span1">235</span>
            <span class="span1 time">2016-06-02</span>
        </div>
    </div>
    <div class="content">
        <div class="name fl_cd">
            <img class="top-photo" src="img/tmp/fff23_10.png">
            <span class="my-name">摄影师华子</span>
            <img class="top-cancel" src="img/3434coll_03.png">

        </div>
        <div class="list list-4">
            <p><a href="">首度人生难得的不是选择，而是选择后的坚持而是选择后的坚持</a></p>
            <div class="img">
                <a href=""><img class="" src="img/tmp/fff23_14.png"></a>
            </div>
        </div>
        <div class="comment">
            <span class="exclusive">专访</span>
            <img class="look" src="img/sdfsdf_03.png" alt="">
            <span class="span1">235</span>
            <img class="look" src="img/fff34_05.png" alt="">
            <span class="span1">235</span>
            <span class="span1 time">2016-06-02</span>
        </div>
    </div>
</div>
<!-- /bodyer -->
<script>
    //删除收藏
    $(".top-cancel").on("click",function(){
        var thit = $(this);
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: ['80%'],
            shadeClose: true, //点击遮罩关闭
            content: '<div class="collect">取消收藏</div>'
        });
        $("body").on("click",".collect",function(){
            $(this).parents(".layui-layer").siblings(".layui-layer-shade").remove();
            $(this).parents(".layui-layer").remove();
            thit.parents(".content").remove();
            var i = $(".content").index();
            if (i<0){
                $("#news-list").html("<h2 style='text-align: center;margin-top:30px;'>暂时没有收藏</h2>");
            }
            $.ajax({
                type: 'POST',
                url:todo,//todo
                data:todo,//todo
                dataType:"json",
                error: function (jqXHR, textStatus, errorThrown) {//进行错误信息的处理
                    /*弹出jqXHR对象的信息*/
                    console.log(jqXHR.responseText + "-" + jqXHR.status + "-" + jqXHR.readyState + "-" + jqXHR.statusText);
                    /*弹出其他两个参数的信息*/
                    console.log(textStatus);
                    console.log(errorThrown);
                },
                success: function(data){
                    console.log(data);
                    if(data.status == 1){

                    }else
                    {
//                alert("data.status="+data.status);
                    }
                }
            });
        });
    });
</script>
</body>
</html>
